package com.zzh.weixinsell.model.pojo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.zzh.weixinsell.utils.serializer.DataToLongserializer;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class OrderDetail {
    private String detailId;

    private String orderId;

    private String productId;

    private String productName;

    private BigDecimal productPrice;

    private Integer productQuantity;

    private String productIcon;

//    @JsonSerialize(using = DataToLongserializer.class)
    private Date createTime;
//    @JsonSerialize(using = DataToLongserializer.class)
    private Date updateTime;


    public OrderDetail(String detailId, String orderId, String productId, String productName, BigDecimal productPrice, Integer productQuantity, String productIcon) {
        this.detailId = detailId;
        this.orderId = orderId;
        this.productId = productId;
        this.productName = productName;
        this.productPrice = productPrice;
        this.productQuantity = productQuantity;
        this.productIcon = productIcon;
    }

    public OrderDetail() {
    }
}